package com.qijian.maindata.domain.query;


import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.util.Set;


/**
 * 安全员对象 查询条件类
 *
 * @author qijian
 * @date 2022-10-11
 */

@Data
@ToString
public class SafetyModleQuery {

    @WhereType(filed = "nick_name", tableName = "sys_user",type = WhereTypeEnum.LIKE)
    private String nickName;
    @WhereType(filed = "region", tableName = "pxjl",type = WhereTypeEnum.LIKE)
    private String region;

    @WhereType(filed = "isMajorHiddenDanger", tableName = "pxjl",type = WhereTypeEnum.LIKE)
    private Boolean isMajorHiddenDanger;

    @WhereType(func = "(sys_dept.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set({1}, ancestors) ) or sys_dept.dept_id = {1})")
    private Long deptId;

    @WhereType(filed = "nick_name",tableName = "pxjl", type = WhereTypeEnum.LIKE)
    private String safetyUserName;

    //按车间名查询
    @WhereType(filed = "factory_name",tableName = "sys_dept")
    private String correctiveTopDeptName;

}
